<?php
require('lib/verify.php');
require('lib/has_char.php');
require('lib/is_approved.php');
require('lib/is_admin.php');

$_category = "warmath";
$_title = "Admin";
require('lib/head.php');

boxTop("Warmath: $_title");
?>
Welcome to the Administration section.<br />
All Admin features integrated in the main interface are denoted with <?adminfeature()?>.
<br /><br />
<b>Add a Raid</b><br />
<a href="add-raid.php">Add a Raid</a>
<br /><br />
<b>Add a Credit</b><br />
To add credit to an existing raid, navigation to that raid's page and click (<?adminfeature()?> add a credit).<br />
<br />
<b>Add Loot</b><br />
To add loot to an existing credit, navigate to that credit's page and click (<?adminfeature()?> add loot).<br />
<br />
<b>Wishlist Lock Status</b><br />
Wishlists are currently 
<?php
if($system["system_locked"]!=1) {
?>
<b>unlocked</b>.<br />
<a href="lock-wishlists.php">Lock Wishlists</a> (to prevent editing) for this Warmath system (e.g. before starting a raid).
<?php
				    }
else {
?>
<b>locked</b>.<br />
<a href="unlock-wishlists.php">Unlock Wishlists</a> (to allow editing) for this Warmath system (e.g. after completing a raid).
<?php
}
?>
<br /><br />
<b>System Log</b><br />
A barebones log of who's been updating their wishlist:<br/>
<a href="log.php">View System Log</a><br/>
<br/>
<b>Characters Awaiting Approval</b><br />
The following characters are awaiting approval:<br /><br />
<i>Click a character's name to approve them.</i><br />
<?php
$system_id = $system["system_id"];
$sql = "select * from wm_characters where character_system_id='$system_id' and character_approved='0' order by character_class asc, character_name asc";
$result = $db->query($sql);
?>
<i><?=$db->num_rows($result)?> characters</i><br/>
<?php
while($chara=$db->fetch_assoc($result)) {
?>
<?=$chara["character_class"]?>: <a href="approve-character.php?id=<?=$chara["character_id"]?>"><?=$chara["character_name"]?></a> (<a href="<? echo PUN_ROOT.'profile.php?id='.$chara["character_forum_id"]?>">forum profile</a>) (<a href="<? echo PUN_ROOT.'message_send.php?id='.$chara["character_forum_id"]?>">PM on forums</a>)<br/>
<?php
}
?>
<br />
<b>Reprocess DKP</b><br />
<i>DKP processing happens automatically after every raid, credit and loot addition.</i><br />
<a href="reprocessDKP.php">Force DKP Reprocessing</a>
<br /><br />

<b>Edit a Raid</b><br />
<i>Not yet implemented.</i>
<br /><br />
<b>Edit Announcement</b><br />
<i>Not yet implemented.</i>

<?php
boxBot();
?>

<?php
require('lib/foot.php');
?>

